import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const WORKFLOW: AppRouteRecordRaw = {
  path: '/workflow',
  name: 'workflow',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.workflow',
    requiresAuth: true,
    icon: 'icon-dashboard',
    order: 1,
  },
  children: [
    {
      path: 'definition',
      name: 'Definition',
      component: () => import('@/views/workflow/definition/index.vue'),
      meta: {
        locale: 'menu.workflow.definition',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'instance',
      name: 'Instance',
      component: () => import('@/views/workflow/instance/index.vue'),
      meta: {
        locale: 'menu.workflow.instance',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'work',
      name: 'Work',
      component: () => import('@/views/workflow/work/index.vue'),
      meta: {
        locale: 'menu.workflow.work',
        requiresAuth: true,
        roles: ['*'],
      },
    }
  ],
};

export default WORKFLOW;
